package com.hoshiicloud.goods.service;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.hoshiicloud.common.utils.tree.GoodsCategoryWithGoodNumTree;
import com.hoshiicloud.goods.entity.goods.GoodsCategory;
import com.hoshiicloud.common.utils.tree.Menu;
import com.hoshiicloud.goods.param.goods.GoodsCategoryUpdateParam;

import java.util.List;

/**
 * <p>
 * 商品类目表 服务类
 * </p>
 *
 * @author zhangshuhu
 * @since 2019-06-04
 */
public interface GoodsCategoryService extends IService<GoodsCategory> {
    Page<GoodsCategory> getPage(Page<GoodsCategory> page, Wrapper<GoodsCategory> queryWrapper, String key);

    GoodsCategory getById(Long id);

    boolean save(GoodsCategory entity);

    boolean updateById(GoodsCategory entity);

    boolean deleteById(Long id);

    List<GoodsCategory> getByIds(List<Long> ids, String key);

    /**
     *  查询所有类目信息《不含禁用》
     */
    List<Menu> getCategorys(Long companyId);

    List<GoodsCategoryWithGoodNumTree> getCategorysWithGoodsNum(Long companyId);

    boolean updateStatus(GoodsCategory entity);

    /**
     * 含禁用项
     * @param companyId
     * @return
     */
    List<Menu> getCategorys3(Long companyId);

    /**
     * 查询类目内容
     *
     * @param categoryContextQueryStr String
     * @return String
     */
    String selectcategoryContext(String categoryContextQueryStr);
}
